import {AxiosGetToToken, AxiosPostToJson} from "./AxiosEncapsulation.js"


async function loginEmail(jsonData) {
    const response = await AxiosPostToJson('/api/loginEmail', jsonData);
    return await response;
}

async function register(jsonData) {
    const response = await AxiosPostToJson('/api/register', jsonData);
    return await response;
}

async function loginUser(jsonData) {
    const response = await AxiosPostToJson('/api/loginUser', jsonData);
    return await response;
}

async function loginJwtKey(jwt) {
    const response = await AxiosGetToToken("/api/user/getUserInfo", jwt);

    return await response;
}

export {loginEmail, register, loginUser, loginJwtKey};
